<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript" language="javascript">
            <!-- Limit the number of characters per textarea -->
            <!-- Begin
            function textCounter(field,countField,maxlimit) {
                if (field.value.length > maxlimit) // if too long...trim it!
                    field.value = field.value.substring(0, maxlimit);
                // otherwise, update 'characters left' counter
                else
                    countField.value = maxlimit - field.value.length;
            }
            //  End -->
        </script>
    </head>
    <body>
        <form name="myForm"
              action="/articles/articles/javascript/dynamictextareacounter.asp?ID=<%=siteID%>"
              method="post">
            <b>One Function to Count and Limit Multiple Form Text Areas</b><br>
            <textarea name="message" wrap="physical" cols="28" rows="5"
                      onKeyDown="textCounter(document.myForm.message1,document.myForm.remLen1,125)"
                      onKeyUp="textCounter(document.myForm.message1,document.myForm.remLen1,125)"></textarea>
            <br>
            <input readonly type="text" name="remLen1" size="3" maxlength="3" value="125">
            characters left
            <br>
            
            <input type="Submit" name="Submit" value="Submit">
            <br>
        </form>
    </body>
</html>
